package com.animee.jiujiangdict;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class SettingActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
    }
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.setting_iv_back:
                finish();
                break;
            case R.id.setting_tv_collect:
                Intent it = new Intent(this, CollectionActivity.class);
                startActivity(it);
                break;
            case R.id.setting_tv_about:

                break;
            case R.id.setting_tv_feedback:

                break;
            case R.id.setting_tv_good:

                break;
            case R.id.setting_tv_share:   //分享这个软件到其他应用给其他用户
                Intent intent = new Intent(Intent.ACTION_SEND); // 启动分享发送的属性
                intent.setType("text/plain"); // 分享发送的数据类型
                String msg = "想要随时随地查询汉字以及成语的详细内容么?快来下载中华字典这个软件吧！下载地址:http://xxxxxxxx";
                intent.putExtra(Intent.EXTRA_TEXT, msg); // 分享的内容
                startActivity(Intent.createChooser(intent, "分享到..."));// 目标应用选择对话框的标题
                break;
        }
    }
}
